<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/12
  Time: 10:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>

    <c:set var="root" value="${pageContext.request.contextPath}"/>
    <link rel="stylesheet" href="../static/css/bootstrap.css">
    <script src="../static/jquery/jquery-2.2.4.min.js"></script>
    <script src="../static/js/bootstrap.min.js"></script>
    <title>Title</title>
    <style type="text/css">
        .namebox{
            width: 100%;
            white-space: nowrap;
            overflow: hidden;/*超出部分隐藏*/
            text-overflow: ellipsis;/*用...代替超出部分*/
            text-align: center;
        }
        a:focus{text-decoration: none}
    </style>
</head>
<body>





<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="/static/css/bootstrap.min.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="/static/jquery/jquery-2.2.4.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script	src="/static/js/bootstrap.min.js"></script>

<script type="text/javascript">
    $(document).ready(function(){
        /* var wd = $(".nav-pills").width();*/
        jQuery(window).scroll(function() {
            $("#top_cate").css("z-index", 9999);
        });

        $("#top_cate").affix({
            offset: {
                top: 25,
                bottom: function () {
                    return (this.bottom = $('.bottom').outerHeight(true));
                }

            }
        });
    });
</script>

<div class="container">
    <jsp:include page="/common/top.jsp"/>

</div>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-2 column">
            <jsp:include page="/common/left_list.jsp"/>
        </div>
        <div class="col-md-10 column">
            <div class="row">
                <%--<c:set var = "plist" value="${sessionScope.plist}"/>--%>
                <c:forEach var="p" items="${plist}" >
                <div class="col-md-3">
                    <div class="thumbnail">
                        <a href="${root}/findDetail?pid=5&page=" class="">
                            <img alt="300x200" style="width: 100%;height: 200px" src="${p.image}" />
                        </a>
                        <div class="caption text-center">
                            <p class="pname" id="pname">
                                ${p.pname}
                            </p>
                            <p>
                                原价<span class="glyphicon glyphicon-yen" aria-hidden="true"></span>${p.marketprice}
                                <span class="glyphicon glyphicon-hand-right" aria-hidden="true"></span>
                            </p>
                            <p>
                                现售<span class="label label-pill label-info" style="text-align: center"><span class="glyphicon glyphicon-yen" aria-hidden="true" ></span>${p.shopprice}</span>
                            </p>
                            <p>
                                <a class="btn btn-primary" href="${root}/editUI?pid=${p.pid}">修改</a>
                                <a class="btn btn-primary" href="${root}/deleteServlet?pid=${p.pid}" onclick="return confirm('确认删除此商品吗？')" >删除</a>
                            </p>
                        </div>

                    </div>
                </div>
                </c:forEach>
            </div>
        </div>
    </div>
</div>

<div class="container">
    <div class="row clearfix">
        <div class="col-md-2 column">
        </div>
        <div class="col-md-3 column" style="text-align: right">
            <ul class="pagination">
                <li style="line-height: 35px">
                    第1页/共17页
                </li>
            </ul>

        </div>
        <div class="col-md-7 column" style="text-align: left">
            <ul class="pagination">
                <li class="disabled">
                    <a href="/findPage?page=1">首页</a>
                </li>

                <li>
                    <a href="/findPage?page=2"
                       aria-label="Next">
                        <span aria-hidden="true">下一页</span>
                    </a>
                </li>
                <li><a href="/findPage?page=17">尾页</a></li>
            </ul>
        </div>
    </div>
</div>
<jsp:include page="/common/bottom.jsp"/>
</body>
<script>
</script>
</html>
